<template>
  <div class="knowledge-apps">
    <div class="knowledge-header">
      <!-- <LeeTabs /> -->
      <div></div>
      <LeeSearch />
    </div>
    <div class="knowledge-content">
      <LeeAppsCard type="knowledge" :cardAddBtn="options" :cardList="apps" />
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted, reactive, ref } from "vue";
import LeeTabs from "@/components/Lee-Tabs/index.vue";
import LeeSearch from "@/components/Lee-Search/index.vue";
import LeeAppsCard from "@/components/Lee-Apps-Card/index.vue";
import { NormalMenuInfo } from "@/types/menu";

onMounted(() => {
  console.log("knowledge page mounted");
});

const options = reactive({
  name: "",
  type: "option",
  options: [
    {
      icon: "iconaddCircle",
      name: "创建知识库",
      fn: () => {},
    },
    {
      icon: "iconfankui1",
      name: "通过知识流水线创建知识库",
      fn: () => {},
    },
  ],
});
const apps = ref<NormalMenuInfo[]>([
  {
    title: "API文档库",
    author: "小李同学",
    files: 19999,
    description:
      "包含所有产品相关的技术文档、用户手册、API文档等资料，方便团队成员快速查阅和学习。",
    createtime: "2025-10-31",
    route: "knowledgeApps/apiDoc",
    menus: [
      {
        name: "文档",
        icon: "iconbook",
        path: "/knowledgeApps/apiDoc",
      },
      {
        name: "API文档",
        icon: "iconbook",
        path: "/knowledgeApps/apiDoc",
      },
      {
        name: "召回测试",
        icon: "iconbook",
        path: "/knowledgeApps/apiDoc",
      },
      {
        name: "设置",
        icon: "iconbook",
        path: "/knowledgeApps/apiDoc",
      },
    ],
  },
]);
</script>

<style lang="scss" scoped>
@use "@/assets/css/lee.scss" as lee;

.knowledge-apps {
  .knowledge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 80px;
    padding: 16px 48px 8px 48px;
    box-sizing: border-box;
  }
  .knowledge-content {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}
</style>
